<script>
$(function(){
    $('#form').submit(function(){
        // ajax发送数据
        $.post(location.href,$(this).serialize(),function(data){
            if (data.state <= 0)
            {
                $('#'+data.extra).focus();
                alert(data.message);
                return false;
            }
			alert(data.message);
			location.href = "?app=customer&mod=list";
            //dialogMessage(data.message,'green');
        },'json');
        return false;
    });
});
</script>

<div class="edit_tab tab">
<div class="bg1">
<div class="bg2">
      <span rel="info" class="span_now">编辑客户</span>
</div>
</div>
</div>
<div >
<table cellspacing="2" cellpadding="2" class="helptable"><tr><td>
<ul>
	<li><b>小提示</b></li>
	<li>(1) <span style="color:red;">红色</span>项为必填项</li>
    <li>(2) 新添加的客户通过审核后才能在客户列表里显示</li>
</ul>
</td></tr>
</table>
</div>
<form id="form">
<div class="post_form" id="info_form">
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		<tr>
			<td class="td2">客户名称：</td>
			<td><span><input name="customer_name" id="customer_name" value="<?php echo $this->customer['customer_name']; ?>" /><font color="#848484">不超过10个字符</font></span></td>
		</tr>
		<tr>
			<td class="td1">座机：</td>
			<td><span><input name="tel" id="tel" value="<?php echo $this->customer['tel']; ?>" /><font color="#848484">7或11位纯数字，区号和号码间不能有符号</font></span></td>
		</tr>
        <tr>
			<td class="td1">手机：</td>
			<td><span><input name="mobile" id="mobile" value="<?php echo $this->customer['mobile']; ?>" /></span></td>
		</tr>
        <tr>
			<td class="td1">地址：</td>
			<td><span><input name="address" id="address" value="<?php echo $this->customer['address']; ?>" /></span></td>
		</tr>
        <tr>
			<td class="td1">电子邮箱：</td>
			<td><span><input name="email" id="email" value="<?php echo $this->customer['email']; ?>" /></span></td>
		</tr>
		<tr>
			<td class="td1">备注：</td>
			<td><textarea name="mark" id="mark"><?php echo $this->customer['mark']; ?></textarea></td>
		</tr>
		<tr>
			<td colspan="2" style="text-align:center" class="td1">
            	<input type="submit" value="提交"/>
            	<input name="" type="reset" class="btn1" value="重置" />
                <input name="customer_id" type="hidden"  value="<?php echo $this->customer['customer_id']; ?>" />
            </td>
		</tr>
     </table>
</div>
</form>